<%--
  Created by IntelliJ IDEA.
  User: FX95
  Date: 2022/10/21
  Time: 15:29
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>欢迎注册</title>
<%--    <link href="css/register.css" rel="stylesheet">--%>
<style>
    body {
        background-image: url("./imgs/reg_bg_min.jpg") ;
        text-align: center;
    }
    table {

        border-collapse: collapse;
        border-spacing: 0;

    }
    .form-div input[type="text"], .form-div input[type="password"], .form-div input[type="email"] {
        width: 268px;
        margin: 10px;
        line-height: 20px;
        font-size: 16px;
    }
    .form-div {

        background-color: rgba(255, 255, 255, 0.27);
        border-radius: 20px;
        border: 1px solid #aaa;
        width: 424px;
        margin-top: 50px;
        margin-left:500px;
        padding: 30px 0 20px 0px;
        font-size: 16px;
        box-shadow: inset 0px 0px 10px rgba(255, 255, 255, 0.5), 0px 0px 15px rgba(75, 75, 75, 0.3);
        text-align: center;


    }





</style>

</head>
<body>

<div class="form-div" align="center">
    <div class="reg-content">
        <h1>欢迎注册</h1>
        <span>已有帐号？</span> <a href="login.jsp">登录</a>
    </div>
    <form id="reg-form" action="registerServlet" method="post" >
        <p style="color: #BC0000; font-size: 10px;margin-left: 150px;">
            ${error}
        </p>
        <table >
            <tr>
                <td>姓名</td>
                <td class="inputs">
                    <input name="NAME" type="text" id="NAME">
                    <br>
<%--                    <span id="NAME_err" class="err_msg" style="display: none">密码格式有误</span>--%>
                </td>
            </tr>
            <tr>
                <td>用户名</td>
                <td class="inputs">
                    <input name="username" type="text" id="username">
                    <br>
                    <span id="username_err" class="err_msg" style="display: none">用户名不太受欢迎</span>
                </td>

            </tr>

            <tr>
                <td>密码</td>
                <td class="inputs">
                    <input name="password" type="password" id="password">
                    <br>
                    <span id="password_err" class="err_msg" style="display: none">密码格式有误</span>
                </td>
            </tr>

            <tr>
                <td>电话号码</td>
                <td class="inputs">
                    <input name="tel" type="text" id="tel">
                    <br>
<%--                    <span id="tel_err" class="err_msg" style="display: none">密码格式有误</span>--%>
                </td>
            </tr>
            <tr>
                <td>单位</td>
                <td class="inputs">
                    <input name="role" type="text" id="role">
                    <br>
<%--                    <span id="role_err" class="err_msg" style="display: none">密码格式有误</span>--%>
                </td>
            </tr>
        </table>

        <div class="buttons">
            <input value="注 册" type="submit" id="reg_btn">
        </div>
        <br class="clear">
    </form>

</div >


<script>

    var e="${error}";
    if (e!=""){
        <%
        //清空session
        session.removeAttribute("error");
        %>
    }

</script>
</body>
</html>